<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('realname',100)->comment('真实姓名');
            $table->string('username',100)->comment('用户名');
            $table->string('password',100)->comment('密码');
            $table->string('email',100)->comment('邮箱');
            $table->string('last_ip',100)->comment('最后登录ip');
            $table->string('status',10)->comment('用户状态');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
